<% remote_form_for :photo,
  :update => :name_and_note,
  :url => valleyers_show_albums_show_photo_url(@photo),
  :method => :put,
  :html => {
  :id => "edit_photo_massage_form"
} do |f| %>
  <dl>
    <dt>名称：</dt>
    <dd><%= f.text_field :name %></dd>
  </dl>
  <dl>
    <dt>随笔：</dt>
    <dd><%= f.text_field :note %></dd>
  </dl>
  <%= link_to_function "确定", "$('edit_photo_massage_form').onsubmit()", :class => :sanp %>
  <%= link_to_remote "取消",
    :update => :name_and_note,
    :url => valleyers_show_albums_show_photos_url(:photo_id => @photo.id),
    :method => :get,
    :html => {
    :class => :sanp
    }
  %>
<% end %>
